# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdesignerplugin
pkgver=5.72.0
pkgrel=0
pkgdesc="Integration of Frameworks widgets in Qt Designer/Creator"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="kcoreaddons-dev kconfig-dev kcompletion-dev kconfigwidgets-dev kiconthemes-dev kio-dev kitemviews-dev kplotting-dev ktextwidgets-dev kwidgetsaddons-dev kxmlgui-dev sonnet-dev"
makedepends="$depends_dev extra-cmake-modules qt5-qttools-dev kdoctools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kdesignerplugin-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="04d92a05353e8358623ae4762f1d5fe2c01ddf24147810c98d7c30ea52b7267953ce9018ad599c25a723eaf6c192fb026d712e0d35e8496455ccab113b0c9e6a  kdesignerplugin-5.72.0.tar.xz"
